package com.cy.mapper;

import com.cy.bean.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface FronthostMapper {
    //添加用户基础信息
    int insrtUser(@Param("openid") String openid, @Param("regtime") String regtime);
    //添加用户详细信息
    int insrtFrontslave(@Param("uid") String uid);
    //通过openid 查询用户 基本资料
    Fronthost selectUserOne(@Param("openid") String openid);
    //通过openid 查询用户 全部资料
    Fronthost selectUserAll(@Param("openid") String openid);
    //添加发热上报报表
    int insertFrontReport ( Frontreport frontreport);
    //通过uid获取核酸报告
    List<Report> selseReportList(@Param("uid") String uid);
    //通过uid获取亲友对象集合
    List<Fronthost> selectFamily(@Param("uid") String uid);
    //通过uid获取亲友对象单个信息
    Fronthost selectFamilyone(@Param("uid") String uid);
    //通过身份证和名字查找亲友对象
    Fronthost Familyone(@Param("uname") String uname,@Param("idnumber") String idnumber);
    //根据自己id和亲友id添加亲友
    int insertfamily(@Param("uid") int uid,@Param("fuid") int fuid);
    //查询是否已添加过此亲友
    Family selechongfu(@Param("uid") int uid, @Param("fuid") int fuid);
    //删除亲友
    int deleFamily(@Param("uid") String uid,@Param("fuid") String fuid);
    //通过电话获取用户的行程记录
    List<Frontnote> selectFrontnote(@Param("phone") String phone,@Param("nowday") String nowday,@Param("sevenday") String sevenday);
    //实名认证
    int updateRealName(@Param("uname") String uname,@Param("phone") String phone,@Param("idnumber") String idnumber,@Param("uid") String uid);

    Fronthost updateMydata(@Param("uname") String uname,@Param("phone") String phone,@Param("idnumber") String idnumber,
                           @Param("nativeplace") String nativeplace,@Param("nowprovince") String nowprovince,@Param("nowcity") String nowcity,
                           @Param("nowarea") String nowarea,@Param("nowaddress") String nowaddress,@Param("uid") String uid);

    Fronthost selectUserAddress(@Param("uid") String uid);
    //核酸列表
    List<Orderrecord> ordlist (@Param("uid") String uid);
}
